import request from '@/utils/request'

// 查询制程合格率列表
export function listProcess(query) {
  return request({
    url: '/report/rptprocess/list',
    method: 'get',
    params: query
  })
}

// 查询制程合格率详细
export function getProcess(id) {
  return request({
    url: '/report/rptprocess/' + id,
    method: 'get'
  })
}

// 新增制程合格率
export function addProcess(data) {
  return request({
    url: '/report/rptprocess',
    method: 'post',
    data: data
  })
}

// 修改制程合格率
export function updateProcess(data) {
  return request({
    url: '/report/rptprocess',
    method: 'put',
    data: data
  })
}

// 删除制程合格率
export function delProcess(id) {
  return request({
    url: '/report/rptprocess/' + id,
    method: 'delete'
  })
}
// 工厂下拉列表
export function getFactoryList() {
  return request({
    url: '/basic/factory/selectList',
    method: 'get'
  })
}
// 制程合格率率
export function clientComplaint2() {
  return request({
    url: '/report/rptprocess/processTotal',
    method: 'get',
  })
}
// 近12个月 制程合格率
export function processList() {
  return request({
    url: '/report/rptprocess/processList',
    method: 'get',
  })
}
